//
//  ZYXAppDelegate.m
//  OCUIAdvanced
//  UITabBarController 导航控制器控制器代码创建
//

#import "ZYXAppDelegate.h"

#import "ZYXNavOneViewController.h"

@implementation ZYXAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    return YES;
}






/**
 * 通过代码创建TabBar控制器
 */
/*
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.window.backgroundColor = [UIColor whiteColor];
    
    // 1.创建tabbar控制器
    UITabBarController *tabbarVc = [[UITabBarController alloc] init];
    
    // 2.设置为window的根控制器
    self.window.rootViewController = tabbarVc;
    
    // 3.添加子控制器
    UIViewController *vc1 = [[UIViewController alloc] init];
    vc1.view.backgroundColor = [UIColor redColor];
    vc1.tabBarItem.title = @"联系人";
    vc1.tabBarItem.image = [UIImage imageNamed:@"tab_buddy_nor"];
    //    [tabbarVc addChildViewController:vc1];
    
    UIViewController *vc2 = [[UIViewController alloc] init];
    vc2.view.backgroundColor = [UIColor blueColor];
    vc2.tabBarItem.title = @"动态";
    vc2.tabBarItem.image = [UIImage imageNamed:@"tab_qworld_nor"];
    //    [tabbarVc addChildViewController:vc2];
    
    UIViewController *vc3 = [[UIViewController alloc] init];
    vc3.view.backgroundColor = [UIColor greenColor];
    vc3.tabBarItem.title = @"设置";
    vc3.tabBarItem.image = [UIImage imageNamed:@"tab_me_nor"];
    //    [tabbarVc addChildViewController:vc3];
    
    tabbarVc.viewControllers = @[vc1, vc2, vc3];
    
    [self.window makeKeyAndVisible];
    
    return YES;
}
*/


@end
